#define _CRT_SECURE_NO_WARNINGS 1
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include<math.h>
#include<stdlib.h>
#include<stdio.h>
#include<unordered_map>
#include<queue>
#include<stack>

using namespace std;

class KthLargest {
public:
    priority_queue<int, vector<int>, greater<int>> qt;
    int _k = 0;
    KthLargest(int k, vector<int>& nums) {
        _k = k;
        for (auto& num : nums)
        {
            qt.push(num);
            if (qt.size() > _k) qt.pop();
        }
    }

    int add(int val) {
        qt.push(val);
        if (qt.size() > _k) qt.pop();
        return qt.top();
    }
};

int main() {
    return 0;
}